package com.yunhe.policyfulfillment.authority.repository;

import com.yunhe.policyfulfillment.authority.domain.PolicyRole;
import com.yunhe.policyfulfillment.authority.model.PolicyRoleQueryCondition;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhengbo
 * @date 2021/9/17 17:18
 */
@Repository
public interface PolicyRoleRepository {

    /**
     * 新增
     * @author zb
     * @date 2021/09/17
     **/
    int createPolicyRoleSelective(PolicyRole policyRole);

    /**
     * 刪除
     * @author zb
     * @date 2021/09/17
     **/
    int deletePolicyRoleByPrimaryKey(@Param("id") Long id);

    /**
     * 更新
     * @author zb
     * @date 2021/09/17
     **/
    int updatePolicyRoleByPrimaryKeySelective(PolicyRole policyRole);

    /**
     * 根据主键查询
     * @author zb
     * @date 2021/09/17
     **/
    PolicyRole searchPolicyRoleByPrimaryKey(@Param("id") Long id);

    /**
     * 根据title查询角色
     * @param title 角色名
     * @return PolicyRole
     */
    PolicyRole searchPolicyRoleByRoleTitle(@Param("title") String title);

    /**
     * 查询角色列表
     * @param policyRoleQueryCondition 角色名
     * @return List<PolicyRole>
     */
    List<PolicyRole> searchPolicyRoleList(PolicyRoleQueryCondition policyRoleQueryCondition);
}
